a quick and dirty utility for creating transparent GIF images
written by Aaron Giles (giles@med.cornell.edu)
version 1.0, 7 November 1994
Overview
This is the first official release of Transparency, an extremely simple free utility for setting the transparency index in GIF images. Transparent GIF images are most commonly used as inline images in WWW pages, though they may have other uses as well.
Transparency is shipped, like all my software, as a fat binary, running incredibly quickly on PowerPC machines.
If you find any bugs or have any comments, please email me at giles@med.cornell.edu. Thank you.
About GIFs
GIF, or Graphics Interchange Format, is a compressed graphics format developed by CompuServe in 1987. The original specifications allowed for only simple images, but a new revision in 1989 created a host of new options for GIF images. One of these options was the ability to choose one color in the GIF's color table which maps transparently when displayed. This feature has turned out to be quite useful when used with WWW browsers which have non-white backgrounds (which is pretty much all of them anymore!)
WWW Browsers with Transparent Support
Just because you created a nifty new transparent GIF image doesn’t mean that it will automatically get displayed properly in all WWW browsers. Fortunately for us Macintosh users, support for transparent GIFs is already present in the latest versions of NCSA Mosaic for the Macintosh and MacWeb. Here is a brief summary of a number of WWW browers, listing those which do and do not support transparent GIFs.
The following browsers support transparent GIFs:
• NCSA Mosaic for the Macintosh 2.0a3, or later
• NCSA Mosaic for X Windows 2.1, or later
• MacWeb 1.00a2.1, or later
The following browsers do not support transparent GIFs:
• NCSA Mosaic for Windows 2.0a6
Design Limitations
Transparency contains no features allowing you to scroll around an image; it is not intended as a GIF viewer. Because it is targeted as a quick solution to setting transparent colors for WWW images, it assumes that the images it is dealing with are monitor-sized or smaller.
Operation
Transparency’s general operation should be pretty straightforward: you can either drag a GIF image onto the Transparency icon, or you can manually open up the Transparency application, choose Open GIF... from the File menu, and select which file you wish to work on. Transparency will then open up the image and display it onscreen for you in a window, against a gray background.
To change the transparent color index, click and hold anywhere inside the image window. A small palette of the GIF’s color table will pop up, from which you can select a new transparent color or “NONE”, to disable all transparencies. (Note that if the GIF already has a transparent color selected, that color will be replaced by an “X” in the color palette.) Once you release the mouse button, the image is redrawn against the gray background, to let you see what the resulting transparent image will look like.
When you click in the image, Transparency determines the color you clicked on and positions the color table palette such that the mouse pointer is automatically positioned over that color. This is a particularly useful shortcut for setting the color: simply click anywhere in the background color, release the mouse button without moving the mouse to a new color, and you have made that color the transparent one. Sometimes, however, this will cause the color palette to be drawn partially offscreen; just move the image window to a more convenient location and try again to fix this problem.
After you have finished with the image, you can save the resulting GIF by choosing Save as GIF89... from the File menu and choosing an output filename.
Change History
1.0:
• Transparency now warns you if you try to close an image without first saving it
1.0b4:
• fixed a bug which prevented the rightmost column of colors from displaying
• changed the current transparent color to an X in the palette
• changed the underlying GIF decoder to perform faster onscreen drawing
1.0b3:
• fixed a bug which would leave the file open after saving, causing -48 errors
• the size of the colors palette is now dependent upon how many colors were defined in the GIF image
1.0b2:
• changed transparency masking from regions to bitmaps; this gets rid of the complex region limitation
• now set the window title to be the name of the image file